[XEND] Prevent None values from appearing in Device SXP
authorAlastair Tse <atse@xensource.com>
Thu, 7 Dec 2006 14:38:16 +0000 (14:38 +0000)
committerAlastair Tse <atse@xensource.com>
Thu, 7 Dec 2006 14:38:16 +0000 (14:38 +0000)
Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xend/server/DevController.py

index 646e19d9defa85fa735c7fcc45527306601b6a5b..b8dc8f47633e3bd2adc5b7ebeec58f259ceaa0c6 100644 (file)
@@ -226,9 +226,11 @@ class DevController:
         for key, val in configDict.items():
             if isinstance(val, (types.ListType, types.TupleType)):
                 for v in val:
-                    sxpr.append([key, v])
+                    if v != None:
+                        sxpr.append([key, v])
             else:
-                sxpr.append([key, val])
+                if val != None:
+                    sxpr.append([key, val])
         return sxpr
 
     def sxprs(self):